<% layout('/layouts/default.html', {title: '其它出库单条码管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('其它出库单条码管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('otheroutbound:barcode:edit')){ %>
					<a href="${ctx}/otheroutbound/barcode/form" class="btn btn-default btnTool" title="${text('新增其它出库单条码')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
				<a href="#" class="btn btn-default" id="btnSetting" title="${text('设置')}"><i class="fa fa-navicon"></i></a>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${otherOutboundBarcode}" action="${ctx}/otheroutbound/barcode/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('其他出库单主键ID')}：</label>
					<div class="control-inline">
						<#form:input path="headerAutoId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('其他出库单行主键ID')}：</label>
					<div class="control-inline">
						<#form:input path="lineAutoId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('条码')}：</label>
					<div class="control-inline">
						<#form:input path="barcode" maxlength="100" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('批次号')}：</label>
					<div class="control-inline">
						<#form:input path="batch" maxlength="100" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('存货ID')}：</label>
					<div class="control-inline">
						<#form:input path="invId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('仓库ID')}：</label>
					<div class="control-inline">
						<#form:input path="warehouseId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('仓区ID')}：</label>
					<div class="control-inline">
						<#form:input path="areaId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('货架ID')}：</label>
					<div class="control-inline">
						<#form:input path="shelvesId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('库位ID')}：</label>
					<div class="control-inline">
						<#form:input path="positionId" maxlength="17" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('库存数量')}：</label>
					<div class="control-inline">
						<#form:input path="qty" maxlength="22" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('出库数量')}：</label>
					<div class="control-inline">
						<#form:input path="outboundQty" maxlength="22" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('状态')}：</label>
					<div class="control-inline width-120">
						<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control isQuick"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm"><i class="glyphicon glyphicon-search"></i> ${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm isQuick"><i class="glyphicon glyphicon-repeat"></i> ${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
//# // 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $('#searchForm'),
	columnModel: [
		{header:'${text("其他出库单主键ID")}', name:'headerAutoId', index:'a.header_auto_id', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/otheroutbound/barcode/form?autoId='+row.autoId+'" class="btnList" data-title="${text("编辑其它出库单条码")}">'+(val||row.id)+'</a>';
		}},
		{header:'${text("其他出库单行主键ID")}', name:'lineAutoId', index:'a.line_auto_id', width:150, align:"center"},
		{header:'${text("条码")}', name:'barcode', index:'a.barcode', width:150, align:"left"},
		{header:'${text("批次号")}', name:'batch', index:'a.batch', width:150, align:"left"},
		{header:'${text("存货ID")}', name:'invId', index:'a.inv_id', width:150, align:"center"},
		{header:'${text("仓库ID")}', name:'warehouseId', index:'a.warehouse_id', width:150, align:"center"},
		{header:'${text("仓区ID")}', name:'areaId', index:'a.area_id', width:150, align:"center"},
		{header:'${text("货架ID")}', name:'shelvesId', index:'a.shelves_id', width:150, align:"center"},
		{header:'${text("库位ID")}', name:'positionId', index:'a.position_id', width:150, align:"center"},
		{header:'${text("库存数量")}', name:'qty', index:'a.qty', width:150, align:"left"},
		{header:'${text("出库数量")}', name:'outboundQty', index:'a.outbound_qty', width:150, align:"left"},
		{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
			return js.getDictLabel("#{@DictUtils.getDictListJson('sys_search_status')}", val, '${text("未知")}', true);
		}},
		{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
			var actions = [];
			//# if(hasPermi('otheroutbound:barcode:edit')){
				actions.push('<a href="${ctx}/otheroutbound/barcode/form?autoId='+row.autoId+'" class="btnList" title="${text("编辑其它出库单条码")}"><i class="fa fa-pencil"></i></a>&nbsp;');
				actions.push('<a href="${ctx}/otheroutbound/barcode/delete?autoId='+row.autoId+'" class="btnList" title="${text("删除其它出库单条码")}" data-confirm="${text("确认要删除该其它出库单条码吗？")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
			//# }
			return actions.join('');
		}}
	],
	//# // 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>